home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
batutl2.zip
/
SEND.DOC
< prev
next >
Wrap
Text File
|
1986-08-15
|
27KB
|
469 lines
¢4 L SEND.COM 1.6
INTRODUCTION
SEND.COM is an enhanced version of the ECHO command, ideal
for sending escape sequences to the printer or screen. The
documentation is primarily a tutorial on ECHO, SEND and redirection
of output. If you already feel expert on ECHO and redirection, you
can skip to the final SUMMARY section to get a short manual on
SEND.
SEND, its source code, documentation, and demonstration files
are copyright 1985 by Howard Rumsey and Barry Simon. They are
placed in public domain with one restriction and may be used for any
purpose including commercial use. It is recomended that the the
full set of files be distributed together. The sole restriction
is that the two files with copyright notices must be distributed
with these copyright notices.
Version 1.5 differs from the unnumbered version 1.0 by
including discussion of redirection of send through COMMAND.COM and
additional $<Cap Letters> commands.
SEND.COM was written by Howard Rumsey. The source file is
found on the disk together with several demonstration files:
MONODEMO.BAT
COLORDEM.BAT
KEYRD.BAT
KEYOFF.BAT
PRINTDEM.BAT
The first four require you to have installed ANSI.SYS via your
CONFIG.SYS file. The first two illustrate the use of SEND with
monochrome and color monitors respectively. Keyrd will redefine
your F9 key to mean "dir" followed by <Enter> and F10 to mean "cls"
followed by <Enter>. Keyoff returns the keys to their original
meaning. The final batch file will illustrate the use of SEND if
you have an IBM graphics or compatible printer attached to LPT1.
This batch file can be run on either monitor, but if you have a
color monitor, you should run it with that as tne active monitor.
The demonstration files and this documentation were written by
Barry Simon.
The following files are also included:
BOLDPRN.BAT: Uses SEND to printout a file of your choice in
boldprint on an IBM printer. Type in the command
"boldprn 'filename'"
TRIAL.TXT: Used in printdem to illustrate boldprn.bat
ANSISYS.ART: An article by B. Simon, which first appeared in
the CAPITOL PC Monitor which describes the use of
ANSI.SYS.
The batch files have numerous remarks embedded in them and you
should copy them to your printer. You should note that you
couldn't do that if these batch files had used ECHO and embedded
escape characters rather than SEND!
These programs are hereby placed in the public domain.
Comments on this program can be sent to:
Barry Simon Howard Rumsey
Caltech 253-37 or Caltech 158-79
Pasadena, CA 91125 Pasadena, CA 91125
CompuServe 72426,3722
This documentation can be printed out by turning on your
printer, making sure that the paper is properly aligned and typing
"copy send.doc prn" at a DOS prompt. If you have an IBM graphics
printer, you can get an even nicer copy by typing "boldprn send.doc"
at the DOS prompt.
INSTALLING SEND.COM
Some effort has been expended to keep SEND.COM under 512
bytes so it takes up only one sector if you have a floppy based
system. In that case, you need to copy SEND.COM to your utility
disk. SEND is not resident so the disk needs to be present
whenever SEND is invoked. On a hard disk system copy SEND.COM to a
directory which is one of your DOS path search directories set by
the PATH command.
USING ECHO
You may be used to exploiting ECHO in your batch files but
may not be aware that it can be invoked from the DOS command line.
If that is the case, type in at the DOS prompt:
echo hello
You need to also hit <Enter> but I won't keep saying that. The
response is amusing but not useful. Next try:
echo hello > prn
SEND page 2
More interesting! Still not so useful but at least if you ever
want to use your printer as a typewriter (why anyone would want to
do this in preference to using a real word processor is beyond me!)
you can do it yourself without needing a BASIC program which does
precisely that.
Now try
echo <Ctrl G>
where "<Ctrl G>" means to hit a "control-G", that is to depress the
<Ctrl> key and strike the G and try
echo <Ctrl G> > prn
These are decidedly more interesting and you may even think of some
uses for them in batch files!
Next try turning off your printer, carefully aligning your
printer paper, turning your printer back on and typing
echo <Ctrl L> > prn
<Ctrl L> is the command to send a "top of form" to your printer but
if you look carefully you will discover that more than a top of
form was sent to the printer. ECHO automatically inserts a
carriage return-line feed pair (CR-LF) to the end of any line so
your last command first sent a top of form but then advanced the
paper one additional line. Annoying, isn't it?
Next try:
echo <Esc>
and
echo <Ctrl [>
(Escape and Control-[ are the same). This doesn't do what you
might hope. <Esc> is interpreted by DOS as a desire on your part
to abort the present command and thus you cannot use ECHO at the
command line to send an <Esc> to either the screen or your printer.
This is unfortunate since ANSI.SYS allows you to do all
sorts of nice things if you send the proper "escape sequences" to
the screen and many printers can be told to turn on boldface or
other neat things by sending escape sequences to them. You can
send such sequences to the printer by using some word processors
(even EDLIN (ugh!) if you use its <Ctrl V> feature) to make a file
with embedded escape characters which you can copy to your printer.
But you then need to have these files around and you have files
with embedded control characters which you may have trouble
printing out or sending over a modem.
SEND is intended to remedy these defects of ECHO:
1. It does not terminate line in a CR-LF combination; one can
add such a pair "by hand".
2. Typing "send ^G" is equivalent (except for the lack of a
CR-LF) to typing "echo <Ctrl G>" so one need not fill files
with control characters.
3. Typing "send ^[E > prn" will send a <Esc>E to the printer
thereby turning on "emphasized" print.
In addition, as will be explained, SEND supports the PROMPT $-
characters.
SEND: CONTROL CHARACTERS
SEND works much like ECHO but if the string to be echoed
includes the caret (<Shift 6> which appears as ^), different rules
apply. SEND will replace ^a by the character <Ctrl A> (ASCII 1),
etc. ^ followed by any letter is replaced by the corresponding
control character whether the letter is upper case or lower case.
The remaining control characters:
^@=ASCII 0